package com.vcredit.creditcat.service;
import com.vcredit.creditcat.model.CustRecommendCard;
import com.vcredit.creditcat.persistence.CustRecommendCardExtMapper;
import com.vcredit.creditcat.persistence.base.CustRecommendCardMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 
 **/
@Service
public class CustRecommendCardService {
	@Autowired
    private CustRecommendCardMapper mapper;
	@Autowired
    private CustRecommendCardExtMapper extMapper;
    
    public void insert(CustRecommendCard obj){
    	mapper.insert(obj);
    }
    
    public void update(CustRecommendCard obj){
    	mapper.update(obj);
    }
    
    public List<CustRecommendCard> findAll(){
		return mapper.findAll();
	}
	
	public List<CustRecommendCard> find(CustRecommendCard obj){
		return mapper.find(obj);
	}
	
	public List<CustRecommendCard> findApplyRecordByCustId(Long custId){
		return extMapper.getCardApplyRecordByCustId(custId);
	}
	
	public Integer countApplyRecord(Long custId){
		return extMapper.countCardApplyRecord(custId);
	}
}